/**
 * 用户类接口
 */
let user = (vm) => {
	return {
		// 获取openid
		getOpenidByCode: (params = {}, ) => {
			params.needLogin = true // 需要登录
			return vm.$u.get('user/getOpenidByCode', params)
		},
		// 运输电子卡片
		transportProfile: (params = {}, ) => {
			params.needLogin = true // 需要登录
			return vm.$u.post('user/profile', params)
		},
		// 登录
		login: (params = {}, ) => {
			return vm.$u.post('user/login', params)
		},
		// 手机验证码登录(中国用户)如果没有账号直接创建
		mobilelogin: (params = {}) => {
			return vm.$u.post('user/mobilelogin', params)
		},
		// 注册test
		newRegister: (params = {}) => {
			return vm.$u.post('user/newRegister', params)
		},
		// 新注册test
		register: (params = {}) => {
			return vm.$u.post('user/register', params)
		},
		// 发送验证码
		sendCaptcha: (params = {}) => {
			return vm.$u.post('sms/send', params)
		},
		// 发送邮箱验证码
		sendCaptchaEmail: (params = {}) => {
			return vm.$u.post('ems/send', params)
		},
		is_user: (params = {}) => {
			params.needLogin = true // 需要登录
			return vm.$u.post('user/is_user', params)
		},
		// 积分充值订单
		scoreOrder: (params = {}) => {
			params.needLogin = true // 需要登录
			return vm.$u.post('users/score/scoreOrder', params)
		},
		getVipSet: (params = {}) => {
			params.needLogin = true // 需要登录
			return vm.$u.get('/basic/getVipSet', params)
		},
		createVipOrder: (params = {}) => {
			params.needLogin = true // 需要登录
			return vm.$u.post('/users/vip/createVipOrder', params)
		},
		// 广告栏招商
		createAdvertBusiness: (params = {}) => {
			params.needLogin = true // 需要登录
			return vm.$u.post('/basic/createAdvertBusiness', params)
		},
		//图标认证
		createIconAuth: (params = {}) => {
			params.needLogin = true // 需要登录
			return vm.$u.post('/basic/createIconAuth', params)
		},
		//修改个人信息
		profile: (params = {}) => {
			params.needLogin = true // 需要登录
			return vm.$u.post('user/profile', params)
		},
		//积分统计
		getScoreTotal: (params = {}) => {
			params.needLogin = true
			return vm.$u.post("users/score/getScoreTotal", params)
		},
		//积分记录
		getScoreList: (params = {}) => {
			params.needLogin = true
			return vm.$u.post("users/score/getScoreList", params)
		},
		// 获取用户信息
		getUserInfo: (params = {}) => {
			params.needLogin = true // 需要登录
			return vm.$u.post('user/getUserInfo', params)
		},
		is_push: (params = {}) => {
			params.needLogin = true // 需要登录
			return vm.$u.post('user/is_push', params)
		},
		is_tj: (params = {}) => {
			params.needLogin = true // 需要登录
			return vm.$u.post('user/is_tj', params)
		},
		getUserAuthIcon: (params = {}) => {
			//params.needLogin = true // 需要登录
			return vm.$u.get('user/getUserAuthIcon', params)
		},
		getUserAuth: (params = {}) => {
			params.needLogin = true // 需要登录
			return new Promise((resolve, reject) => {
				vm.$u.get('user/getUserAuth', params).then(res => {
					uni.setStorageSync("userAuth", res) 
					resolve(res)
				}).catch(err => {
					reject(err)
				})
			})
		},
		//获取用户主页信息
		getUserHomepage: (params = {}) => {
			params.needLogin = true // 需要登录
			return vm.$u.get('user/getUserHomepage', params)
		},
		// 获取我的发布
		getMyRelease: (params = {}) => {
			params.needLogin = true // 需要登录
			return vm.$u.get('user/getMyRelease', params)
		},
		// 删除我的发布
		delMyRelease: (params = {}) => {
			params.needLogin = true // 需要登录
			return vm.$u.get('user/delMyRelease', params)
		},
		// 重置密码
		resetpwd: (params = {}) => {
			return vm.$u.post('user/resetpwd', params)
		},
		// 重置密码的验证码
		send: (params = {}) => {
			return vm.$u.post('sms/send', params)
		},
		// 上架隐藏接口
		appCheck: (params = {}) => {
			return vm.$u.post('/common/appCheck', params)
		},
		// 实名认证
		authName: (params = {}) => {
			params.needLogin = true // 需要登录
			return vm.$u.post('/userAudit/profile', params)
		},
		// 是否实名认证
		getUserAudit: (params = {}) => {
			params.needLogin = true // 需要登录
			return vm.$u.post('/userAudit/getUserAudit', params)
		},
		// 俄罗斯用户分享后增加vip权限
		addVip: (params = {}) => {
			params.needLogin = true // 需要登录
			return vm.$u.get('/users/vip/addVip', params)
		},
		//新增商品库
		saveUserGoods: (params = {}) => {
			params.needLogin = true // 需要登录
			return vm.$u.post('/user/saveUserGoods', params)
		},
		//商品库列表
		getGoodsList: (params = {}) => {
			params.needLogin = true // 需要登录
			return vm.$u.post('/user/getGoodsList', params)
		},
		//数量
		goodsCount: (params = {}) => {
			params.needLogin = true // 需要登录
			return vm.$u.post('/user/goodsCount', params)
		},
		//快捷发布
		quickRelease: (params = {}) => {
			params.needLogin = true // 需要登录
			return vm.$u.post('/user/quickRelease', params)
		},
		//撤销发布
		delRelease: (params = {}) => {
			params.needLogin = true // 需要登录
			return vm.$u.post('/user/delRelease', params)
		},
		//删除商品
		deleteRelease: (params = {}) => {
			params.needLogin = true // 需要登录
			return vm.$u.post('/user/deleteRelease', params)
		},
		//商品库详情
		getGoodsDetail: (params = {}) => {
			params.needLogin = true // 需要登录
			return vm.$u.post('/user/getGoodsDetail', params)
		},
		//再次发布
		republishRelease: (params = {}) => {
			params.needLogin = true // 需要登录
			return vm.$u.post('/user/republishRelease', params)
		},
		//获取用户邀请码
		getUserAgentCode: (params = {}) => {
			params.needLogin = false // 需要登录
			return vm.$u.post('/user/getUserAgentCode', params)
		},
		//获取邀请积分统计
		getInvitationScoreTotal: (params = {}) => {
			params.needLogin = true
			return vm.$u.post("users/score/getInvitationScoreTotal", params)
		},
		//获取用户邀请信息
		getInvitationInfo: (params = {}) => {
			params.needLogin = true
			return vm.$u.post("users/score/getInvitationInfo", params)
		},
		//获取用户邀请海报
		getInvitationImg: (params = {}) => {
			params.needLogin = true
			return vm.$u.post("users/score/getInvitationImg", params)
		},
		//邀请积分记录
		getInvitationScoreList: (params = {}) => {
			params.needLogin = true
			return vm.$u.post("users/score/getInvitationScoreList", params)
		},
		//关注
		guanZhu: (params = {}) => {
			params.needLogin = true
			return vm.$u.post("/user/guanZhu", params)
		},
		//推广关注
		tgGuanZhu: (params = {}) => {
			params.needLogin = true
			return vm.$u.post("/user/tgGuanZhu", params)
		},
		//是否关注
		isGuanZhu: (params = {}) => {
			params.needLogin = true
			return vm.$u.post("/user/isGuanZhu", params)
		},

		//推广货物权限
		release_goods_auth: (params = {}) => {
			params.needLogin = true
			return vm.$u.post("/auth/release_goods_auth", params)
		},
		//推广跨境货代权限
		release_crossborder_auth: (params = {}) => {
			params.needLogin = true
			return vm.$u.post("/auth/release_crossborder_auth", params)
		},
		//验证每天推广条数
		release_day_auth: (params = {}) => {
			params.needLogin = true
			return vm.$u.post("/auth/release_day_auth", params)
		},
		//验证每天发布竞标个数
		auction_day_auth: (params = {}) => {
			params.needLogin = true
			return vm.$u.post("/auth/auction_day_auth", params)
		},
		//验证每天参与竞标个数
		order_join_day_auth: (params = {}) => {
			params.needLogin = true
			return vm.$u.post("/auth/order_join_day_auth", params)
		},
		//点击聊天扣除积分
		message_score: (params = {}) => {
			params.needLogin = true
			return vm.$u.post("/auth/message_score", params)
		},
		//通过账号获取id
		mine: (params = {}) => {
			params.needLogin = true
			return vm.$u.post("/auth/mine", params)
		},
		//提现记录列表
		withdrawalRecordList: (params = {}) => {
			params.needLogin = true
			return vm.$u.post("users/score/withdrawalRecordList", params)
		},
		//用户-积分提现
		pointsWithdrawal: (params = {}) => {
			params.needLogin = true
			return vm.$u.post("users/score/pointsWithdrawal", params)
		},
		//提现记录
		withdrawalRecord: (params = {}) => {
			params.needLogin = true
			return vm.$u.post("users/score/withdrawalRecord", params)
		},
		getUserIndentity: (params = {}) => {
			params.needLogin = true // 需要登录
			return vm.$u.post('/userAudit/getUserIndentity', params)
		},
		//任务中心-翻译记录
		recordsList: (params = {}) => {
			params.needLogin = true // 需要登录
			params.user_id = uni.getStorageSync("user_id")
			return vm.$u.post('/basic/myOperateLiuyan', params)
		},
		//会议/专业类型
		catesList: (params = {}) => {
			params.needLogin = true // 需要登录
			return vm.$u.post('/crontab/cate', params)
		},
		//意向设置回显
		intention_query: (params = {}) => {
			params.needLogin = true // 需要登录
			params.user_id = uni.getStorageSync("user_id")
			return vm.$u.post('/basic/staff_query', params)
		},
		//意向设置保存
		intention_save: (params = {}) => {
			params.needLogin = true // 需要登录
			params.user_id = uni.getStorageSync("user_id")
			return vm.$u.post('/basic/staff_set', params)
		},
		//视频会议
		meeting_check: (params = {}) => {
			params.needLogin = true // 需要登录
			return vm.$u.post('/basic/check_meeting', params)
		},
		//获取参会人员列表
		meeting_search: (params = {}) => {
			params.needLogin = true // 需要登录
			return vm.$u.post('/user/search_user', params)
		},
		//获取数字签名
		meeting_UserSig: (params = {}) => {
			//params.needLogin = true // 需要登录
			return vm.$u.get('/TLSSigAPIv22/genUserSig',params)
		},
		//预约
		meeting_submint: (params = {}) => {
			params.needLogin = true // 需要登录
			return vm.$u.post('/crontab/request_score',params)
		},
		//体现金额
		meeting_prices: (params = {}) => {
			params.needLogin = true // 需要登录
			return vm.$u.post('/crontab/request_score',params)
		},
		//多语言管家开始时间
		meeting_duration: (params = {}) => {
			params.needLogin = true // 需要登录
			return vm.$u.get('/crontab/duration',params)
		},
		//查询预约 接单人员
		meeting_find: (params = {}) => {
			params.needLogin = true // 需要登录
			return vm.$u.post('/crontab/find_message',params)
		},
		//创建当前会议
		my_postLiuyan: (params = {}) => {
			params.needLogin = true // 需要登录
			return vm.$u.post('/basic/my_Liuyan', params)
		},
		//确定服务人员
		service_confirm: (params = {}) => {
			params.needLogin = true // 需要登录
			return vm.$u.post('/crontab/confirm_operate_at', params)
		},
		//更换服务人员
		selects_confirm: (params = {}) => {
			params.needLogin = true // 需要登录
			return vm.$u.post('/crontab/update_customer', params)
		},
		//取消订单
		cancel_confirm: (params = {}) => {
			params.needLogin = true // 需要登录
			return vm.$u.post('/crontab/cancel_message', params)
		},
		//更新会议开始
		start_confirm: (params = {}) => {
			params.needLogin = true // 需要登录
			return vm.$u.post('/crontab/meeting_start', params)
		},
		//判断订单是否超时
		yanzheng_confirm: (params = {}) => {
			params.needLogin = true 
			return vm.$u.post('/crontab/meeting_status', params)
		},
		//提现记录
		tixian_log: (params = {}) => {
			params.needLogin = true 
			return vm.$u.post('/crontab/tixian_log', params)
		},
		//申诉
		appeal_log: (params = {}) => {
			params.needLogin = true 
			return vm.$u.post('/crontab/appeal', params)
		},
		//提现操作
		tixian_confirm: (params = {}) => {
			params.needLogin = true 
			return vm.$u.post('/crontab/tixian', params)
		},
		//验证超时
		timeout_confirm: (params = {}) => {
			params.needLogin = true 
			return vm.$u.post('/crontab/meeting_timeout', params)
		},
		//查看用户是否已预约
		flag_confirm: (params = {}) => {
			params.needLogin = true 
			return vm.$u.get('/crontab/message_flag', params)
		},
		//开始时间间隔
		duration_search: (params = {}) => {
			params.needLogin = true 
			return vm.$u.get('/crontab/duration_search', params)
		},
		
	}
}

// 抛出当前模块
export default user